---
description: Codegen for React Apollo with TypeScript. Generates React Hooks and TypeScript types.
---

# Create-React-App

Since v2 of [Create-React-App](https://github.com/facebook/create-react-app), you can use TypeScript without the need to eject from the basic scripts packages.

```ts filename="codegen.ts"
import type { CodegenConfig } from '@graphql-codegen/cli'

const config: CodegenConfig = {
  schema: 'http://my-server/graphql',
  documents: 'src/**/*.graphql',
  generates: {
    'components.tsx': {
      plugins: ['typescript', 'typescript-operations', 'typescript-react-apollo']
    }
  }
}
export default config
```
